package com.key.controller;

import com.key.common.R;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/msg")
public class ShiroExceptionController {

    @RequestMapping("/unauthorized")
    @ResponseBody
    public R unauthorizedUrl(){
        R r = new R();
        r.setCode(500);
        r.setMsg("抱歉，您没有权限访问！");
        return r;
    }

    @RequestMapping("/loginUrl")
    @ResponseBody
    public R loginUrl(){
        R r = new R();
        r.setCode(500);
        r.setMsg("抱歉，您未登录！");
        return r;
    }

}
